import request from '@/utils/request'

// 查询商铺管理列表
export function listHouse(query) {
  return request({
    url: '/asset/house/list',
    method: 'get',
    params: query
  })
}

// 查询商铺管理详细
export function getHouse(id) {
  return request({
    url: '/asset/house/' + id,
    method: 'get'
  })
}

// 新增商铺管理
export function addHouse(data) {
  return request({
    url: '/asset/house',
    method: 'post',
    data: data
  })
}

// 修改商铺管理
export function updateHouse(data) {
  return request({
    url: '/asset/house',
    method: 'put',
    data: data
  })
}

// 删除商铺管理
export function delHouse(id) {
  return request({
    url: '/asset/house/' + id,
    method: 'delete'
  })
}
//得到所有的商铺不分页
export  function getAllHouses(){
  return request({
    url: '/asset/house/getAllHouses',
    method: 'get'
  })
}
//根据商铺ID查询商铺信息
/**
 * {
 "msg": "操作成功",
 "code": 200,
 "data": {
 "houseName": "JRG-B26-1-102",
 "buildingName": "B27栋",
 "code": "102",
 "address": "光谷大道109号",
 "blockName": "光谷金融港",
 "floor": "1"
 }
 }
 */
export function getAllResourceByHouseId(id) {
  return request({
    url: '/asset/house/getAllResourceByHouseId/'+id,
    method: 'get'
  })
}
//查询商圈、楼栋、商铺的三级联数据
export function getAllHouseCascade(){
  return request({
    url: '/asset/house/getAllHouseCascade',
    method: 'get'
  })
}




